import request from '@/utils/request'

// 获取管理员列表
export function listAdminApi(params) {
  return request({
    url: '/admin/admin/list',
    method: 'get',
    params
  })
}

// 添加管理员
export function addAdminApi(data) {
  return request({
    url: '/admin/admin/add',
    method: 'post',
    data,
    headers: {
      'Content-Type': data instanceof FormData ? 'multipart/form-data' : 'application/json'
    }
  })
}

// 编辑管理员
export function editAdminApi(data) {
  return request({
    url: '/admin/admin/edit',
    method: 'post',
    data,
    headers: {
      'Content-Type': data instanceof FormData ? 'multipart/form-data' : 'application/json'
    }
  })
}

// 删除管理员
export function deleteAdminApi(params) {
  return request({
    url: '/admin/admin/delete',
    method: 'delete',
    params
  })
}




